import http from "./request.js"

export default{
	//登陆接口
	login(params){
		return http.post('/api/v1/login',params)
	},	
	getUserInfo(){
		return http.post('/api/v1/user/getUserInfo')
	},
	getProductList(params){
		return http.post('/api/v1/product/index',params)
	},
	getProductDetail(params){
		return http.post('/api/v1/product/detail',params)
	},
	getCartList(params){
		return http.post('/api/v1/cart/lists',params)
	},
	addCart(params){
		return http.post('/api/v1/cart/add',params)
	},
	removeCartItem(params){
		return http.post('/api/v1/cart/remove',params)
	},
	updateCart(params){
		return http.post('/api/v1/cart/update',params)
	},
	getCategory(){
		return http.post('/api/v1/product/category')
	},
	getSearchResult(params){
		return http.post('/api/v1/product/search',params)//搜索商品
	},
	createOrder(params){
		return http.post('/api/v1/order/create',params)//创建订单
	},
	getOrderList(params){
		return http.post('/api/v1/order/lists',params)//订单列表
	},
	getArea(params){
		return http.post('/api/v1/area',params)//获取省市区
	},
	createAddress(params){
		return http.post('/api/v1/address/create',params)//创建收获地址
	},
	getAddressList(params){
		return http.post('/api/v1/address/lists',params)//收获地址列表
	},
	removeAddressItem(params){
		return http.post('/api/v1/address/remove',params)//收获地址删除
	},
	
}